fontchooserwidget: Refactor code so we actually optimize
authorBenjamin Otte <otte@redhat.com>
Wed, 22 Jul 2015 13:04:34 +0000 (15:04 +0200)
committerBenjamin Otte <otte@redhat.com>
Wed, 22 Jul 2015 14:01:21 +0000 (16:01 +0200)
commit31191d5566847ab6278d736066b0fd49241db3a9
treee02b4166933e9fa7e165c59cdf509ecb34b887ca
parent3fc5d09890e453dd85e94b78f4649abeb2fce53f
fontchooserwidget: Refactor code so we actually optimize

Previously, we would pango_font_describe() every time the code ran and
we wouldn't ever hit the optimized quick exit.

The code now is a lot more complex because the
compute-actual-value-when-required-the-first-time approach is not
supported out of the box in GtkTreeModel (or GValue).
gtk/gtkfontchooserwidget.c
gtk/ui/gtkfontchooserwidget.ui